package storyteller;

import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;

import com.flagstone.transform.FSColor;

public class PlayingWithColors
{

 
  /**
   * @param args
   * @throws NoSuchMethodException 
   * @throws SecurityException 
   * @throws InvocationTargetException 
   * @throws IllegalAccessException 
   * @throws IllegalArgumentException 
   */
  public static void main(String[] args) throws SecurityException, NoSuchMethodException, IllegalArgumentException, IllegalAccessException, InvocationTargetException
  {
    String meth = "olive"; //808000
    Class<?> c;
    try
    {
      c = Class.forName("com.flagstone.transform.FSColorTable");
      
      //Method[] allMethods = c.getDeclaredMethods();
      
      Method m = c.getMethod(meth, new Class[0]);
      FSColor co = (FSColor) m.invoke(null, new Object[0]);
      
      System.out.println("Olive? " + co + co.getRed() + co.getGreen() + + co.getBlue());
    }
    catch (ClassNotFoundException e)
    {
      // TODO Auto-generated catch block
      e.printStackTrace();
    }


  }

}
